import request from '@/utils/request'

export default {
  initShopCartList(){
    return request({
      url: '/shopCart/infos',
      method: 'post',
    })
  },
  deleteShopCart(params){
    let data = {
      id: params.id
    }
    return request({
      url: '/shopCart/data/delete',
      method: 'post',
      data
    })
  },
  deleteShopCartChoose(params){
    let data = params.ids;
    return request({
      url: '/shopCart/data/deleteByIds',
      method: 'post',
      data
    })
  },
  updateShopCartInfoById(params){
    let data = {
      id: params.id,
      cartNum: params.cartNum
    }
    return request({
      url: '/shopCart/data/updateById',
      method: 'post',
      data
    })
  }
}
